﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace NetFrameworkExtensions.DataLayer.EF4
{
  public abstract class ConcurrentData<TIdentified, TIdentifier> :
    IdentifiedData<TIdentified, TIdentifier>,
    IConcurrentData
    where TIdentified : ConcurrentData<TIdentified, TIdentifier>
    where TIdentifier : IEquatable<TIdentifier>
  {
    [Timestamp]
    public virtual byte[] Timestamp { get; set; }
  }

  public abstract class IdentityConcurrentData<TIdentified, TIdentifier> :
    IdentityIdentifiedData<TIdentified, TIdentifier>,
    IConcurrentData
    where TIdentified : IdentityConcurrentData<TIdentified, TIdentifier>
    where TIdentifier : IEquatable<TIdentifier>
  {
    [Timestamp]
    public virtual byte[] Timestamp { get; set; }
  }
}
